package com.yehangtech.designpattern.结构型_适配器;

import com.yehangtech.designpattern.结构型_适配器.adapter.MqAdapter;
import com.yehangtech.designpattern.结构型_适配器.mq.RebateInfo;
import com.yehangtech.designpattern.结构型_适配器.mq.create_account;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

public class Main {
    public static void main(String[] args) throws Exception {
        create_account create_account = new create_account();
        create_account.setNumber("100001");
        create_account.setAddress("河北省.廊坊市.⼴阳区.⼤学⾥职业技术学院");
        create_account.setAccountDate(new Date());
        create_account.setDesc("在校开户");
        Map<String, String> paramMap = new HashMap<>(16);
        paramMap.put("userId", "number");
        paramMap.put("bizId", "number");
        paramMap.put("bizTime", "accountDate");
        paramMap.put("desc", "desc");
        RebateInfo rebateInfo01 = MqAdapter.filter(create_account.toString(), paramMap);
        System.out.println("mq.create_account(适配前):" + create_account.toString());
        System.out.println("mq.create_account(适配后):" + rebateInfo01.toString());
    }
}
